<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <body>

        <ui:composition template="./Template/generalTemplate.xhtml">

            <ui:define name="content">
                
                <h:form id="login">
                    <p:panel id="Home" header="Home" style="height:440px;">
                        <div style="margin-top:120px;font-weight:bold;font-size: 2em;text-align:center;">
                            Welcome to Merlion Food Limited
                        </div> 
                    </p:panel>
                </h:form>

                <h:form id ="logIn" rendered ="#{indexManagementManagedBean.loginRender}">
                    <p:commandButton value="Sign in" actionListener ="#{loginManagementManagedBean.goLogin}"/>
                    <a href="/MerlionFoodERP-war/resetPassword.xhtml" style="margin-left:10px;"> 
                        Forget My Password 
                    </a>
                    <h:outputText value="#{indexManagementManagedBean.message}" style="position:relative;float:right;margin-right:20px;margin-top:5px;" />

                </h:form>
                <h:form id="logOut" rendered ="#{indexManagementManagedBean.logoutRender}" >
                    <p:commandButton value= "Sign out" actionListener ="#{logoutManagementManagedBean.doLogout}"/>
                    <h:outputText value="#{indexManagementManagedBean.message}" style="position:relative;float:right;margin-right:20px;margin-top:5px;" />
                </h:form>
            </ui:define>

            <ui:define name="bottom">
                <p:messages id="statusMessages"/>
            </ui:define>

        </ui:composition>

    </body>
</html>
